/// 应用配置文件
/// 用于集中管理应用的公共配置，方便打包马甲包时修改
class AppConfig {
  /// 应用名称
  static const String appName = 'Quản lý YouDian';
  
  /// 应用包名（Android）
  static const String packageName = 'com.example.youdianstar';
  
  /// 应用Bundle ID（iOS）
  static const String bundleId = 'com.example.youdianstar';
  
  /// 主页URL
  static const String homeUrl = 'https://s.youdianstar.com/sw/member/login.html';
  
  /// 用户代理字符串
  static const String userAgent = 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36';
  
  /// 是否显示调试横幅
  static const bool showDebugBanner = false;
  
  /// 应用主题色
  static const int primaryColor = 0xFF2196F3;
  
  /// 启动时是否自动请求权限
  static const bool autoRequestPermissions = true;
  
  /// 权限控制配置
  /// 控制哪些权限需要在启动时申请
  static const PermissionConfig permissionConfig = PermissionConfig(
    requestCamera: true,        // 是否申请摄像头权限
    requestMicrophone: true,    // 是否申请麦克风权限
    requestLocation: true,      // 是否申请定位权限
    requestPhone: true,         // 是否申请电话权限
    requestStorage: true,      // 是否申请存储权限
    requestContacts: false,     // 是否申请通讯录权限
    requestNotification: false, // 是否申请通知权限
    
    // 控制哪些权限需要在状态页面显示
    showCamera: true,
    showMicrophone: true,
    showLocation: true,
    showPhone: true,
    showStorage: false,
    showContacts: false,
    showNotification: false,
  );
  
  /// 权限请求说明文本
  static const String permissionDialogTitle = '权限需求';
  static const String permissionDialogContent = '网页需要访问相关权限才能正常工作。请在设置中授予应用相应权限。';
  
  /// 退出确认对话框文本
  static const String exitDialogTitle = '退出应用';
  static const String exitDialogContent = '确定要退出应用吗？';
  
  /// 按钮文本
  static const String cancelText = '取消';
  static const String confirmText = '确定';
  static const String goToSettingsText = '去设置';
  
  /// 权限状态显示文本
  static const String permissionStatusTitle = '权限状态';
  static const String permissionGranted = '✅ 已授权';
  static const String permissionDenied = '❌ 未授权';
  
  /// 权限名称显示文本
  static const String cameraPermissionName = '摄像头权限';
  static const String microphonePermissionName = '麦克风权限';
  static const String locationPermissionName = '位置权限';
  static const String phonePermissionName = '电话权限';
  static const String storagePermissionName = '存储权限';
  static const String contactsPermissionName = '通讯录权限';
  static const String notificationPermissionName = '通知权限';
}

/// 权限配置类
class PermissionConfig {
  final bool requestCamera;
  final bool requestMicrophone;
  final bool requestLocation;
  final bool requestPhone;
  final bool requestStorage;
  final bool requestContacts;
  final bool requestNotification;
  
  final bool showCamera;
  final bool showMicrophone;
  final bool showLocation;
  final bool showPhone;
  final bool showStorage;
  final bool showContacts;
  final bool showNotification;
  
  const PermissionConfig({
    required this.requestCamera,
    required this.requestMicrophone,
    required this.requestLocation,
    required this.requestPhone,
    required this.requestStorage,
    required this.requestContacts,
    required this.requestNotification,
    required this.showCamera,
    required this.showMicrophone,
    required this.showLocation,
    required this.showPhone,
    required this.showStorage,
    required this.showContacts,
    required this.showNotification,
  });
} 